home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-12-08 | 1.7 KB | 54 lines | [TEXT/GEOL] |
- Item 6864157 7-Dec-89 09:07
-
- From: D1950 CSG, Don Phillips,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- cc: MACDTS Macintosh Developer Tech. Supt.
-
- Sub: External Object Code
-
- Hi,
-
- I would like to use the bsearch() and qsort() routines from the C libraries in
- my MacApp/Pascal program. How do I go about doing this?
-
- In an implementation section of one of my MacApp modules
- (UTTSearchMatches.inc1.p) I have the following statement:
-
- PROCEDURE qsort( base : PTR; nmemb : LONGINT; size : LONGINT;
- FUNCTION compar( prmItem1 : PTR; prmItem2 : PTR ) : LONGINT ); C; EXTERNAL;
-
- just like the Pascal manual tells me to.
-
- This is a dump of my screen when I try to compile:
-
- MABuild Ch
- MABuild - v. 2.0ß9 Release 7/5/89 Start: 11:56:31 12/7/89
-
- Copyright Apple Computer, Inc. 1986-1989
- All Rights Reserved.
-
- Target Folder: "HardDisk:Choices:.Debug Files:"
- Making: Ch.MAMake
- Compiling: UCh.p
- Compiling: MCh.p
- Compiling: UTTSearchMatches.p
- Linking: Ch
- ### Link: Error: Undefined entry, name: (Error 28) "compar"
- Referenced from: TTSEARCHMATCHES_SORTOCCUPATIONCOUNTS in file:
- HardDisk:Choices:.Debug Files:UTTSearchMatches.p.o
- ### Link: Errors prevented normal completion.
- ### MPW Shell - Execution of HardDisk:Choices:.Debug Files:Ch.MakeIt
- terminated.
-
-
- 1. How can I get the linker to recognize that all I am looking for is a
- pointer to a function and not the real function "compar"?
- 2. How do I link in the code for the C qSort function using ch.MaMake, do I
- have to do a separate link or can I use the 'OtherLinkFiles' shell variable?
-
- Thanks in advance,
- Ken Mahoney
-
-